﻿<!doctype html>
<html style="height:100%;">
<head>
    <meta charset="utf-8">
    <title>国家粮食储备库粮油配送系统</title>
    <script type="text/javascript" src="js/jquery.js"></script>

    <script type="text/javascript" src="js/echarts.min.js"></script>
    <script src="js/ol.js"></script>
    <script src="js/proj4.js"></script>
    <script type="text/javascript" src="js/openlayers_echart.es5.js"></script>
    <script type="text/javascript" src="js/china.js"></script>
    <script type="text/javascript" src="js/js.js"></script>
    <script type="text/javascript" src="js/jquery.cxselect.min.js"></script>
    <script src="js/lodash.js"></script>

    <link rel="stylesheet" href="css/comon0.css">
    <link rel="stylesheet" href="js/ol.css">
    <link rel="stylesheet" href="css/index.css">

    <script type="text/javascript" src="./js/jquery.treetable.js"></script>
    <link rel="stylesheet" type="text/css" href="./css/jquery.treetable.css">
    <link rel="stylesheet" type="text/css" href="./css/jquery.treetable.theme.default.css">

    <!-- <link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> -->
    <link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">

    <link rel="stylesheet" href="css/jquery.pagination.css" />
    <!-- <link rel="stylesheet" href="css/jquery.pagination.min.css" /> -->
    <script type="text/javascript" src="js/jquery.pagination.js"></script>
    <!-- <script type="text/javascript" src="js/jquery.pagination.min.js"></script> -->
    <!-- <link href="./css/font-awesome.min.css" rel="stylesheet"> -->
</head>
<body style="height:100%;">
    <div class="canvas">
        <iframe src="js/canvas.html" frameborder="0" style="width: 100%; height: 100%"></iframe>
    </div>
    <div class="loading">
        <div class="loadbox"> <img src="images/loading.gif"> 页面加载中... </div>
    </div>
    <div style="overflow: hidden;background:rgba(0,0,40,0) ; position: relative; z-index: 2;height:100%;">
        <div class="boxall index_nav" style="margin-bottom:0;">
            <ul style="height: 30px; margin-bottom: 0px;">
                <li class="l_left total_chose_fr nav_active">综合统计</li>
                <li class="l_left total_chose_pl">数据管理</li>
                <li class="r_right total_chose_pl">物流配送</li>
                <li class="r_right total_chose_pl">数据分析</li>
            </ul>
            <div class="header_box"><h1>国家粮食储备库粮油配送系统</h1></div>
        </div>
        <div class="mainbox index_tabs" style="height:calc(100% - 60px);overflow:hidden;">
            <div class="inner">
                <ul class="clearfix" style="height:68%;margin-bottom: 15px;">
                    <li>
                        <div class="boxall dataAllBorder01" style="height: calc(50% - 15px);">
                            <div class="dataAllBorder02">
                                <div class="alltitle">供应网点日供应能力</div>
                                <div class="navboxall" id="echart1" style="height:calc(100% - 34px);">

                                </div>
                            </div>
                        </div>
                        <div class="boxall dataAllBorder01" style="height:50%">
                            <div class="dataAllBorder02">
                                <div class="alltitle">配送基本信息</div>
                                <div class="navboxall" style="padding:10px 8px;">
                                    <span>选择运输车辆：</span>
                                    <select class="search_chose_box" id="selectChe">
                                        <option value="0">---请选择---</option>
                                        <option value="1">一号车</option>
                                        <option value="2">二号车</option>
                                    </select>
                                    <button class="cldw" id="start-animation">定位跟踪</button>
                                    <div class="clxx">
                                        <span>运输车辆信息：</span>
                                        <div class="zwxx" style="text-align: center;margin-top:20px;">暂无信息</div>
                                        <div class="message scrollStyle" style="padding:10px;overflow-y:auto;display:none;height:125px;">
                                            <table class="table-bordered" style="margin-bottom: 15px;">
                                                <tr>
                                                    <th>运输车</th>
                                                    <th>起始地</th>
                                                    <th>目的地</th>
                                                    <th>预计时间</th>
                                                </tr>
                                                <tr>
                                                    <td class="che">一号车</td>
                                                    <td>粮油中心</td>
                                                    <td>呼和浩特市军粮供应服务中心</td>
                                                    <td>30分</td>
                                                </tr>
                                            </table>
                                            <table class="table-bordered">
                                                <tr>
                                                    <th>商品名称</th>
                                                    <th>商品数量</th>
                                                </tr>
                                                <tr>
                                                    <td>大米</td>
                                                    <td>2吨</td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </li>
                    <li>
                        <!-- <div class="boxall" style="height:100px">
                            <div class="navboxall"><h1>通用大数据可视化展示平台模板</h1></div>
                        </div> -->
                        <div class="boxall dataAllBorder01">
                            <div class="dataAllBorder02">
                                <div class="map_title_box">
                                    <div class="map_title">实时地图</div>
                                </div>
                                <div class="slyxMap" style="width:90px;position:absolute;top:70px;right:50px;z-index:9999;">
                                    <div class="slMap" style="width:50%;float:left;">矢量</div>
                                    <div class="yxMap" style="width:50%;float:left;">影像</div>
                                </div>
                                <div class="navboxall" style="overflow: hidden;">
                                    <div style="width: 120%; height: 120%; position: relative; left: -10%; top: -11%;" id="map"><!--echart3-->
                                        
                                    </div>
                                    <div id="popup" class="ol-popup">
                                        <a href="#" id="popup-closer" class="ol-popup-closer"></a>
                                        <div id="popup-content"></div>
                                    </div>
                                </div>
                                
                                <!--地图工具栏-->
                                <!-- <div class="map_tool_outbox">
                                    <span class="map_tool" onclick="zoomFull()">
                                        <a class="map_tool_inner" title="全图"></a>
                                    </span>
                                    <span class="map_tool" onclick="zoomOut()">
                                        <a class="map_tool_inner" title="放大" style="background-position-x:-36px"></a>
                                    </span>
                                    <span class="map_tool" onclick="zoomIn()">
                                        <a class="map_tool_inner" title="缩小" style="background-position-x:-72px"></a>
                                    </span>
                                    <span class="map_tool" onclick="showHeatMap()">
                                        <a class="map_tool_inner" title="倒退视图" style="background-position-x:-108px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner" title="前进视图" style="background-position-x:-144px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner display_type_btn" title="专题地图" style="background-position-x:-180px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner city_chose_btn" title="城市定位" style="background-position-x:-432px"></a>
                                    </span>
                                    <span class="map_tool" id="btnBuffer">
                                        <a class="map_tool_inner" title="缓冲区分析" style="background-position-x:-216px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner addition_check_btn check_btn" title="地址检索" style="background-position-x:-252px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner chemistry_check_btn check_btn" onclick="chemistryCheck()" title="危化品检索"
                                            style="background-position-x:-288px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner enterprise_check_btn check_btn" onclick="enterpriseCheck()" title="企业检索"
                                            style="background-position-x:-324px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner car_check_btn check_btn" onclick="carCheck()" title="车辆检索"
                                            style="background-position-x:-360px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner" onclick="Search()" title="搜索" style="background-position-x:-468px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <a class="map_tool_inner" onclick="cancel()" id="fresh_tool" title="清空"
                                            style="background-position-x:-396px"></a>
                                    </span>
                                    <span class="map_tool">
                                        <input type="text" id="txtCoord" style="width:150px;visibility:hidden" />
                                    </span>
                                </div> -->
                            </div>
                        </div>

                    </li>
                    <li>
                        <div class="boxall dataAllBorder01" style="height: calc(50% - 15px);">
                            <div class="dataAllBorder02">
                                <div class="tab_right">
                                    <a class="cc active">配送点</a>
                                    <a class="cd">商品</a>
                                    <!-- <input type="text" placeholder="输入关键字" class="search" /> -->
                                </div>
                                <div class="tab_table scrollStyle" style="height:calc(100% - 54px);overflow-y:auto;margin: 10px;">
                                    <table class="table1" width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tbody></tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <div class="boxall dataAllBorder01" style="height:50%;">
                            <div class="dataAllBorder02" style="padding: 0 5px;">
                                <div class="alltitle tab_lb">列表</div>
                                <div class="navboxall cc_cd scrollStyle" style="height:calc(100% - 40px);overflow-y:auto;padding: 0 10px;">
                                    <table class="table1" width="100%" border="0" cellspacing="0" cellpadding="0">
                                        
                                    </table>
                                </div>
                            </div>
                        </div>

                    </li>
                </ul>
                <ul class="clearfix" style="height: calc(32% - 15px);">
                    <li style="width:60%">
                        <div class="boxall dataAllBorder01">
                            <div class="dataAllBorder02">
                                <div class="alltitle">商品库存</div>
                                <div class="navboxall " id="echart2">

                                </div>
                            </div>
                        </div>
                    </li>
                    <li style="width: 40%">

                        <div class="boxall dataAllBorder01">
                            <div class="dataAllBorder02">
                                <div class="alltitle">出库统计图</div>
                                <div class="navboxall" id="echart4"></div>
                            </div>
                        </div>
                    </li>

                </ul>
            </div>
            <div class="inner" style="display:none;">
                <div class="sjgl_left">
                    <a class="ccgl active1">配送点管理</a>
                    <a class="cdgl">商品管理</a>
                </div>
                <div style="height: calc(100% - 50px);width: 40%;float:left;">
                    <div class="sjgl_tab ccglxx" style="width: 100%;height:100%;">
                        <div style="width:100%;height: 60%;overflow:hidden;" class="sjgl dataAllBorder01">
                            <div class="dataAllBorder02" style="padding: 10px;background: rgba(0,0,0,.2);">
                                <div style="overflow: hidden;"><input type="button" value="新增" class="sjgl_xz"></div>
                                <div class="scrollStyle"  style="height:calc(100% - 40px);overflow-y:auto;padding: 0 10px;">
                                    <table class="table-bordered">
                                        <thead>
                                            <tr>
                                                <th>
                                                    仓储名称
                                                </th>
                                                <th>
                                                    联系人
                                                </th>
                                                <th>
                                                    联系电话
                                                </th>
                                                <th>
                                                    所在城市
                                                </th>
                                                <th style="width: 78px;">
                                                    操作
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody class="ccData">
                                            <tr>
                                                <td>1</td>
                                                <td>2</td>
                                                <td>3</td>
                                                <td>4</td>
                                                <td><span class="modification"><i class="fa fa-pencil"></i></span><span class="delete"><i class="fa fa-trash-o"></i></span></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                                <!-- <div class="setPageDiv">
                                    <div class="Pagination" id="pagination"></div>
                                </div> -->
                            </div>
                        </div>
                        <div style="width:100%;height: calc(40% - 15px);margin-top:15px;position:relative;" class="sjgl dataAllBorder01">
                            <div class="dataAllBorder02" style="padding: 10px;background: rgba(0,0,0,.2);">
                                <div class="ck_rk">
                                    <a class="rk active3">入库</a>
                                    <a class="ck">出库</a>
                                    <!-- <input type="text" placeholder="输入关键字" class="search" /> -->
                                    <div style="float: right;"><input type="button" value="新增" class="cc_rk">
                                    <input style="display:none;" type="button" value="新增" class="cc_ck"></div>
                                    <!-- <div style="float: right;"></div> -->
                                    <!-- sjgl_xz2 -->
                                </div>
                                <div class="scrollStyle" style="height:calc(100% - 40px);overflow-y: auto;width:100%;padding:0 10px 10px;">
                                    <table class="table-bordered">
                                        <thead>
                                            <tr>
                                                <th>
                                                    商品名称
                                                </th>
                                                <th>
                                                    商品类型
                                                </th>
                                                <th>
                                                    当前库存
                                                </th>
                                                <th>
                                                    操作
                                                </th>
                                            </tr>
                                        </thead>
                                        <tbody class="cdData">
                                            <tr>
                                                <td>1</td>
                                                <td>2</td>
                                                <td>3</td>
                                                <td>4</td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="dataAllBorder01 cd_div" style="display:none;z-index: 99999999;">
                                <div class="dataAllBorder02" style="background: rgba(0,0,0,.2);">
                                    <div style="height:50px;border-bottom: 1px solid #e8e8e8;margin-bottom: 20px;">
                                        <span class="cd_span1">商品入库</span>
                                        <span class="cd_span2"><i>X</i></span>
                                    </div>
                                    <ul class="cd_ul" style="overflow:hidden;">
                                        
                                    </ul>
                                    <div style="width:calc(100% - 6px);height:50px;border-top: 1px solid #e8e8e8;position: absolute;bottom: 0;">
                                        <input type="button" value="保存" class="cd_bc">
                                        <input type="button" value="保存" class="cd_rk_bc" style="display: none;">
                                        <input type="button" value="保存" class="cd_ck_bc" style="display: none;">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- cangchu -->
                        <div class="ccxx dataAllBorder01">
                            <div class="dataAllBorder02" style="background: rgba(0,0,0,.2);">
                                <div style="height:50px;border-bottom: 1px solid #e8e8e8;margin-bottom: 20px;">
                                    <span class="ccxx_span1">新增信息</span>
                                    <span class="ccxx_span2"><i>X</i></span>
                                </div>
                                <div class="ccxx_ul" style="padding: 0 20px;">
                                    <ul class="cc_cd_ul" style="overflow:hidden;">
                                        
                                    </ul>
                                    <div class="cc_zd">
                                        <ul>
                                            <!-- <li><span>字段名：</span><input type="text" /></li>
                                            <li><span>字段：</span><input type="text" /></li> -->
                                        </ul>
                                        <div>
                                            <input type="button" value="保存" class="cczd_bc">
                                        </div>
                                    </div>
                                </div>
                                <div style="width:calc(100% - 2px);height:50px;border-top: 1px solid #e8e8e8;position: absolute;bottom: 0;">
                                    <input type="button" value="新增字段" class="ccxx_xzzd">
                                    <input type="button" value="保存" class="ccxx_bc">
                                    <input type="button" value="保存" class="ccxx_xg" style="display: none;">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="sjgl_tab cdglxx" style="width: 100%;display: none;">
                        <div style="width:100%;height: calc(100% - 50px);overflow:hidden;" class="sjgl dataAllBorder01">
                            <div class="dataAllBorder02" style="padding: 10px;background: rgba(0,0,0,.2);">
                                <div><input type="button" value="新增" class="sjgl_xz3"></div>
                                <table class="table-bordered">
                                    <thead>
                                        <tr>
                                            <th>商品名称</th>
                                            <th>商品类型</th>
                                            <th>商品数量</th>
                                            <th>商品制造商</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody class="cdb">
                                        <tr>
                                            <td>1</td>
                                            <td>2</td>
                                            <td>3</td>
                                            <td>4</td>
                                            <td>5</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="cdxx dataAllBorder01" style="z-index: 9999999;">
                            <div class="dataAllBorder02" style="background: rgba(0,0,0,.2);">
                                <div style="height:50px;border-bottom: 1px solid #e8e8e8;margin-bottom: 20px;">
                                    <span class="cdxx_span1">新增商品信息</span>
                                    <span class="cdxx_span2"><i>X</i></span>
                                </div>
                                <div class="cdxx_ul" style="padding: 0 20px;">
                                    <ul style="overflow:hidden;">
                        
                                    </ul>
                                </div>
                                <div style="width:calc(100% - 2px);height:50px;border-top: 1px solid #e8e8e8;position: absolute;bottom: 0;">
                                    <input type="button" value="保存" class="ccxx_bc2">
                                    <input type="button" value="保存" class="ccxx_bc3" style="display:none;">
                                    <input type="button" value="保存" class="ccxx_bc4" style="display:none;">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="width: calc(60% - 15px);height: calc(100% - 50px);float:left;margin-left: 15px;" class="dataAllBorder01">
                    <div class="dataAllBorder02">
                        <div class="map_title_box">
                            <div class="map_title">实时地图</div>
                        </div>
                        <div class="navboxall" style="overflow: hidden;height:730px;">
                            <div style="width: 120%; height: 120%; position: relative; left: -10%; top: -11%;" id="map2">
                                <!--echart3-->
                        
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="inner" style="display:none;">
                
            </div>
            <div class="inner" style="display:none;">
                <!-- <div class="dataAllBorder01">
                    <div class="dataAllBorder02"> -->
                        <!-- <div style="padding:10px 15px;">
                            <span>选择仓储：</span><select id="select_cc"></select>
                            <span>选择商品：</span><select id="select_cd"></select>
                            <input type="button" value="统计" id="tj">
                        </div>
                        <div class="dataAllBorder01">
                            <div class="dataAllBorder02">
                        <div id="table_tj1" style="padding:0 15px;">
                                

                        </div>
                        <div id="table_tj2">

                        </div> -->
                        <div style="width:240px;height:100%;float:left;">
                            <div class="dataAllBorder01">
                                <div class="dataAllBorder02" style="background:#023095;cursor:pointer;">
                                    <ul class="sjfx_ul">
                                        <!-- <li class="ul_li_kc">商品统计</li> -->
                                        <!-- <li class="ul_li_psdxx active5">配送点信息</li>
                                        <li class="ul_li_rk">商品入库库存统计</li>
                                        <li class="ul_li_ck">商品出库统计</li>
                                        <li class="ul_li_jjxg">库存报警分析</li> -->
                                        <!-- <li class="ul_li_jjxd">警戒线低库存</li> -->
                                        <li class="active5 gywd">粮食应急供应网点基本情况调查</li>
                                        <li class="pszx">粮食应急配送中心基本情况调查</li>
                                        <li class="jgqy">粮食应急加工企业基本情况调查</li>
                                        <li class="cyqy">粮食应急储运企业基本情况调查</li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div style="width:calc(100% - 255px);height:100%;float:left;margin-left:15px;">
                            <div class="spxx" style="height:100%;">
                                <div class="dataAllBorder01" style="height:100px;">
                                    <div class="dataAllBorder02">
                                        <div class="cb_tj_table" style="padding:10px;overflow: hidden;background: rgba(0,0,0,.2);">
                                            <div style="width:300px;float:left;" class="cxtj_div1">
                                                <span>选择条件：</span>
                                                <select>
                                                    <option value="0">---请选择---</option>
                                                    <option value="1">粮油中心</option>
                                                    <!-- <option value="2">所在城市</option> -->
                                                    <option value="3">配送点</option>
                                                    <option value="4">商品</option>
                                                </select>
                                            </div>
                                            <div class="cxtj_div2" style="width: calc(100% - 300px);float:left;">
                            
                                            </div>
                                        </div>
                                        <div class="jjx" style="display:none;padding:10px;overflow: hidden;background: rgba(0,0,0,.2);">
                                            <div style="width:300px;float:left;" class="jjx_div1">
                                                <span>选择警戒线库存：</span>
                                                <select style="width:150px;">
                                                    <option value="0">---警戒线库存---</option>
                                                    <option value="1">警戒线高库存</option>
                                                    <option value="2">警戒线低库存</option>
                                                </select>
                                            </div>
                                            <div class="jjx_div2" style="width: calc(100% - 300px);float:left;">
                            
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="dataAllBorder01" style="margin-top:15px;height: calc(100% - 116px);">
                                    <div class="dataAllBorder02" style="padding:10px;background: rgba(0,0,0,.2);">
                                        <div class="header_table" style="margin-top:-10px;margin-bottom:10px;position: relative;">
                                            <div class="map_title">库存统计</div>
                                            <span style="position:absolute;right:15px;top:8px;" onclick="method5('dataTable')"><i
                                                    class="fa fa-download"></i></span>
                                        </div>
                                        <div class="scrollStyle" style="height: calc(100% - 40px);overflow-y:auto;padding:0 10px;">
                                            <table class="table-bordered tj_table" id="dataTable">
                            
                                            </table>
                                        </div>
                                    </div>
                            
                                </div>
                            </div>
                            <div class="psdxx" style="height:100%">
                                <div class="dataAllBorder01" >
                                    <div class="dataAllBorder02" style="padding:10px;background: rgba(0,0,0,.2);">
                                        <div class="header_table" style="margin-top:-10px;margin-bottom:10px;position: relative;">
                                            <div class="map_title">结果</div>
                                            <span style="position:absolute;right:15px;top:8px;" onclick="method5('dataTable')"><i
                                                    class="fa fa-download"></i></span>
                                        </div>
                                        <div class="scrollStyle" style="height:calc(100% - 40px);overflow-y:auto;padding:0 10px;">
                                            <table class="table-bordered tj_table" id="dataTable2">
                                                <thead>
                                                    <!-- <tr>
                                                        <th>仓储名称</th>
                                                        <th>经度</th>
                                                        <th>纬度</th>
                                                        <th>所在城市</th>
                                                        <th>行政编码</th>
                                                        <th>联系人</th>
                                                        <th>联系电话座机</th>
                                                        <th>联系电话手机</th>
                                                        <th>邮政编码</th>
                                                        <th>仓储地址</th>
                                                    </tr> -->
                                                </thead>
                                                <tbody>

                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <div class="inner" style="display:none;">4</div>
            <div class="inner" style="display:none;">5</div>
            
        </div>
    </div>
    <div class="jsbottom">
        <span style="font-size: 14px;font-weight:bold;float: left;margin-left: 30px;">使用单位：内蒙古粮油仓储中心</span>
        <span style="font-size: 14px;font-weight:bold;float: right;margin-right: 18px;">技术支持单位：内蒙古坤兰科技股份有限公司</span>
    </div>
    <script type="text/javascript">
    $(function () {
        
    })
         
        var idTmr;

        function getExplorer() {
            var explorer = window.navigator.userAgent;
            //ie  
            if (explorer.indexOf("MSIE") >= 0) {
                return 'ie';
            }
            //firefox  
            else if (explorer.indexOf("Firefox") >= 0) {
                return 'Firefox';
            }
            //Chrome  
            else if (explorer.indexOf("Chrome") >= 0) {
                return 'Chrome';
            }
            //Opera  
            else if (explorer.indexOf("Opera") >= 0) {
                return 'Opera';
            }
            //Safari  
            else if (explorer.indexOf("Safari") >= 0) {
                return 'Safari';
            }
        }

        function method5(tableid) {
            if (getExplorer() == 'ie') {
                var curTbl = document.getElementById(tableid);
                var oXL = new ActiveXObject("Excel.Application");
                var oWB = oXL.Workbooks.Add();
                var xlsheet = oWB.Worksheets(1);
                var sel = document.body.createTextRange();
                sel.moveToElementText(curTbl);
                sel.select();
                sel.execCommand("Copy");
                xlsheet.Paste();
                oXL.Visible = true;

                try {
                    var fname = oXL.Application.GetSaveAsFilename("Excel.xls",
                        "Excel Spreadsheets (*.xls), *.xls");
                } catch (e) {
                    print("Nested catch caught " + e);
                } finally {
                    oWB.SaveAs(fname);
                    oWB.Close(savechanges = false);
                    oXL.Quit();
                    oXL = null;
                    idTmr = window.setInterval("Cleanup();", 1);
                }

            } else {
                tableToExcel(tableid)
            }
        }

        function Cleanup() {
            window.clearInterval(idTmr);
            CollectGarbage();
        }
        var tableToExcel = (function () {
            var uri = 'data:application/vnd.ms-excel;base64,',
                template = '<html><head><meta charset="UTF-8"></head><body><table  border="1">{table}</table></body></html>',
                base64 = function (
                    s) {
                    return window.btoa(unescape(encodeURIComponent(s)))
                },
                format = function (s, c) {
                    return s.replace(/{(\w+)}/g, function (m, p) {
                        return c[p];
                    })
                }
            return function (table, name) {
                if (!table.nodeType)
                    table = document.getElementById(table)
                var ctx = {
                    worksheet: name || 'Worksheet',
                    table: table.innerHTML
                }
                window.location.href = uri + base64(format(template, ctx))
            }
        })()
    </script>
    
<style>
	.ol-viewport {
		/*完全透明*/
		background-color: rgba(0, 0, 0, 0);
		/*完全不透明*/
		/*background-color: rgba(0, 0, 0, 1);*/
	}
</style>
</body>
</html>
